<template>
  <view class="content">
    <view
      class="card"
      v-for="item in cardlist"
      :key="item.id"
      @click="gotoDetail(item)"
    >
      <view class="card-title">{{ item.title }}</view>
      <view class="card-content">{{ item.content }}</view>
    </view>
  </view>
</template>
<script setup>
import { ref } from "vue";
const cardlist = ref([
  { title: "证明", content: "流水证明", id: 1, url: "/pages/salary/index" },
  { title: "标题", content: "内容", id: 2 },
  { title: "标题", content: "内容", id: 3 },
  { title: "标题", content: "内容", id: 4 },
]);
const gotoDetail = (item) => {
  uni.navigateTo({
    url: item.url,
  });
};
</script>
<style scoped>
.content {
  margin: 20rpx;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.card {
  width: 48%;
  height: 120rpx;
  background: linear-gradient(180deg, #80aaff 0, #dde8ff 100%);
  border-radius: 12rpx;
  margin-bottom: 20rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  padding: 20rpx;
  box-sizing: border-box;
}
.card-title {
  font-size: 32rpx;
  color: #ff0000;
}
.card-content {
  font-size: 28rpx;
  color: #333;
}
</style>
